package com.ruoyi.web.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface DatabaseMapper {
    List<String> getAllDatabases();

    List<Map<String, String>> listAllTables(@Param("dbName") String dbName);

    List<Map<String, String>> getTableInfo(@Param("dbName") String dbName, @Param("tableName") String tableName);

    List<Map<String, String>> listColumns(@Param("dbName") String dbName, @Param("tableName") String tableName);

    List<Map<String, Object>> validateSql(@Param("sql") String sql);

    List<Map<String, Object>> execSql(@Param("sql") String sql);
}
